#include <iostream>
#include <vector>
using namespace std;

vector<vector<int>> ans = {};
vector<int> track = {};

void dfs(int x, vector<int>& nums){
    if(x == nums.size()){
        ans.push_back(track);
        return;
    }
    track.push_back(nums[x]);
    dfs(x+1, nums);
    track.pop_back();
    dfs(x+1, nums);
    return;
}

vector<vector<int>> subsets(vector<int>& nums) {
    dfs(0, nums);
    return ans;
}